import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RechargeHomeComponent } from './recharge-home/recharge-home.component';
import { RechargeFirstComponent } from './recharge-first/recharge-first.component';
import { RechargeSecondComponent } from './recharge-second/recharge-second.component';
import { RechargeSuccessComponent } from './recharge-success/recharge-success.component';
import { RechargeUnusualComponent } from './recharge-unusual/recharge-unusual.component';
import { RechargeRuleComponent } from './recharge-rule/recharge-rule.component';
import { RechargeUnusualSuccessComponent } from './recharge-unusual-success/recharge-unusual-success.component';

const routes: Routes = [
  {
    path: '',
    component: RechargeHomeComponent,
    children: [
      {
        path: '', redirectTo: 'first', pathMatch: 'full'
      },
      {
        path: 'first', component: RechargeFirstComponent,
      },
      {
        path: 'second', component: RechargeSecondComponent ,
      },
      {
        path: 'success', component: RechargeSuccessComponent ,
      },
      {
        path: 'unusual', component: RechargeUnusualComponent ,
      },
      {
        path: 'unusualSuccess', component: RechargeUnusualSuccessComponent ,
      },
      {
        path: 'rule', component: RechargeRuleComponent ,
      },
      {
        path: '**', redirectTo: ''
      }
    ]
  },
  {
    path: '**',
    redirectTo: '',
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class RechargeRoutingModule { }
